function x = Initialization(type,exampleORour)
%已知量：初始的纬度、经度、高程、速度、时间
%设置惯导的初始条件
%type为返回值的类型：位置position_k_1、position_k_2速度v_k_1、v_k_2时间time0
%exampleORour:参考数据还是我们的推车数据
if(exampleORour=="example")

    %time_k_2   =91620.010;
    phi_k_2     =deg2rad(23.1373950000136);
    lambda_k_2  =deg2rad(113.371364999961);
    h_k_2       =2.17499804740568;
    vN_k_2      =0.000254811517186265;
    vE_k_2      =-0.000957660817383467;
    vD_k_2      =0.00028205148159767;
    %time       =91620.015
    time_k_1    =91620.015;
    phi_k_1     =deg2rad(23.1373950000118);
    lambda_k_1  =deg2rad(113.371364999930);
    h_k_1       =2.17499667427329;
    vN_k_1      =-0.000335001803402226;
    vE_k_1      =-0.000291904552362833;
    vD_k_1      =0.000267201475022336;
    roll       =deg2rad(0.0106699654066861);Phi=roll;
    pitch      =deg2rad(-2.14244580205864);theta=pitch;
    heading    =deg2rad(-75.7498470874650);psi=heading;
        
    %其实是cnb
    cbn11=cos(theta)*cos(psi);
    cbn12=cos(theta)*sin(psi);
    cbn13=-sin(theta);
    cbn21=-cos(Phi)*sin(psi)+sin(Phi)*sin(theta)*cos(psi);
    cbn22=cos(Phi)*cos(psi)+sin(Phi)*sin(theta)*sin(psi);
    cbn23=sin(Phi)*cos(theta);
    cbn31=sin(Phi)*sin(psi)+cos(Phi)*sin(theta)*cos(psi);
    cbn32=-sin(Phi)*cos(psi)+cos(Phi)*sin(theta)*sin(psi);
    cbn33=cos(Phi)*cos(theta);
    cbn=[cbn11 cbn12 cbn13;
         cbn21 cbn22 cbn23;
         cbn31 cbn32 cbn33];

elseif(exampleORour=="our")
    %time_k_2   =446285.014;
    phi_k_2     =deg2rad(30.5279788680);
    lambda_k_2  =deg2rad(114.3557804579);
    h_k_2       =21.228;
    vN_k_2      =-0.000;
    vE_k_2      =-0.001;
    vD_k_2      =-0.000;
    %time       =446285.019
    time_k_1    =446285.019;
    phi_k_1     =deg2rad(30.5279788680);
    lambda_k_1  =deg2rad(114.3557804579);
    h_k_1       =21.228;
    vN_k_1      =-0.000;
    vE_k_1      =-0.001;
    vD_k_1      =-0.000;
    roll       =deg2rad(-0.70649671);Phi=roll;
    pitch      =deg2rad(0.54152910);theta=pitch;
    heading    =deg2rad(87.81361694);psi=heading;
    
    %其实是cnb
    cbn11=cos(theta)*cos(psi);
    cbn12=cos(theta)*sin(psi);
    cbn13=-sin(theta);
    cbn21=-cos(Phi)*sin(psi)+sin(Phi)*sin(theta)*cos(psi);
    cbn22=cos(Phi)*cos(psi)+sin(Phi)*sin(theta)*sin(psi);
    cbn23=sin(Phi)*cos(theta);
    cbn31=sin(Phi)*sin(psi)+cos(Phi)*sin(theta)*cos(psi);
    cbn32=-sin(Phi)*cos(psi)+cos(Phi)*sin(theta)*sin(psi);
    cbn33=cos(Phi)*cos(theta);
    cbn=[cbn11 cbn12 cbn13;
         cbn21 cbn22 cbn23;
         cbn31 cbn32 cbn33];
end
%%
if(type=="cbn_k_1")
    x=cbn';
elseif(type=="v_k_2")
    x=[vN_k_2; vE_k_2; vD_k_2];
elseif(type=="position_k_2")
    x=[phi_k_2; lambda_k_2; h_k_2];
elseif(type=="v_k_1")
    x=[vN_k_1; vE_k_1; vD_k_1];
elseif(type=="position_k_1")
    x=[phi_k_1; lambda_k_1; h_k_1];
elseif(type=="time_k_1")
    x=time_k_1;
end
end